<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<script>
//日期格式化
function timestampToDateTime(timestamp) {
	if (timestamp == null) {
		return '';
	} else {
		var date = new Date(timestamp);//时间戳为10位需*1000，时间戳为13位的话不需乘1000
		Y = date.getFullYear() + '-';
		M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
		D = (date.getDate()+1 < 10 ? '0'+(date.getDate()) : date.getDate()) + ' ';
		H = (date.getHours()+1 < 10 ? '0'+(date.getHours()) : date.getHours()) + ':';
		m = (date.getMinutes()+1 < 10 ? '0'+(date.getMinutes()) : date.getMinutes()) + ':';
		S = (date.getSeconds()+1 < 10 ? '0'+(date.getSeconds()) : date.getSeconds());
		return Y+M+D+H+m+S;
	}
}
//日期格式化
function timestampToDate(timestamp) {
	if (timestamp == null) {
		return '';
	} else {
		var date = new Date(timestamp);//时间戳为10位需*1000，时间戳为13位的话不需乘1000
		Y = date.getFullYear() + '-';
		M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
		D = (date.getDate()+1 < 10 ? '0'+(date.getDate()) : date.getDate());
		return Y+M+D;
	}
}
</script>